<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // 筛选大于1的数字，组成新的数组
        var arr = [1, 2, 3, 4];
        var new_arr = [];
        for (var i = 0; i < arr.length; i++) {
            if (arr[i] > 1) {
                new_arr[new_arr.length] = arr[i];
            }
        }
        alert(new_arr);
    </script>
</head>

<body>

</body>

</html>